home *** CD-ROM | disk | FTP | other *** search
- property mysprite, myframes, myframecounter, mycurrframelist, myframerects, myoffrect, mycurrrectlist, mycurrentlook, mypreviouslook, mystate, mytimer, mywait, myframelimit, mymember, myframestart, myH, myV, myhgrid, myvgrid, vmagnification, vposlist, craneratio, leftfactor, topfactor, rightfactor, bottomfactor, hfactor, vfactor, mystarttime, myendtime, myendvalue, mystartvalue, normalmem1, normalmem2, darkmem1, darkmem2, mysprite1, mysprite2
-
- on new me, insprite
- global backgroundsprite, gridsprites, backgroundnumber
- set mytimer to 0
- set mywait to 6
- set myH to 900
- set myV to 900
- set mysprite to insprite
- repeat with thesprite = mysprite to mysprite + 3
- puppetSprite(thesprite, 1)
- end repeat
- set vposlist to [208, 230, 252, 275, 296, 319]
- set vmagnification to [0.5, 0.60000000000000009, 0.70000000000000007, 0.80000000000000004, 0.90000000000000002, 1.0]
- set myhgrid to 4
- set myvgrid to 1
- set chutedata to value(field "chute animation info")
- set mycurrentlook to 1
- set mypreviouslook to 1
- set myframes to getaProp(chutedata, backgroundnumber)
- set mycurrframelist to getAt(myframes, mycurrentlook)
- set myframecounter to 1
- set myframelimit to count(mycurrframelist)
- set myframestart to 1
- set myH to ((myhgrid - 1) * 200) + 100
- set myH to the left of sprite backgroundsprite + myH
- set myV to getAt(vposlist, myvgrid)
- set mytimer to 0
- set mywait to 6
- set mystate to #active
- updatemysprites(me)
- return me
- end
-
- on moveme me, craneresult, cranecommand, backchange
- global cranehgrid, cranevgrid
- case mystate of
- #active:
- set myH to myH + backchange
- if (myhgrid = cranehgrid) and (myvgrid = cranevgrid) then
- set mycurrentlook to 2
- else
- set mycurrentlook to 1
- end if
- updatemysprites(me)
- #flashing:
- set myH to myH + backchange
- if the timer >= myendtime then
- set mystate to #active
- set mycurrentlook to 1
- else
- if the timer >= mystarttime then
- if mycurrentlook = 1 then
- set mycurrentlook to 2
- else
- set mycurrentlook to 1
- end if
- set mystarttime to the timer + 20
- end if
- end if
- updatemysprites(me)
- end case
- end
-
- on updatemysprites me
- if not (mypreviouslook = mycurrentlook) then
- set mycurrframelist to getAt(myframes, mycurrentlook)
- set myframelimit to count(mycurrframelist)
- set mypreviouslook to mycurrentlook
- end if
- if the timer >= mytimer then
- set myframecounter to myframecounter + 1
- if myframecounter > myframelimit then
- set myframecounter to 1
- end if
- set mytimer to the timer + mywait
- end if
- set curdata to getAt(mycurrframelist, myframecounter)
- set tempcounter to 0
- set curdatacount to count(curdata)
- repeat with mydata in curdata
- set tempcounter to tempcounter + 1
- if not (mydata = []) then
- set thepoint to getAt(mydata, 1)
- set themember to getAt(mydata, 2)
- set whichSprite to mysprite + tempcounter - 1
- set the loc of sprite whichSprite to point(myH, myV) + thepoint
- set the member of sprite whichSprite to themember
- next repeat
- end if
- set the loc of sprite (mysprite + tempcounter - 1) to point(900, 900)
- end repeat
- end
-
- on flashchute me
- set mystate to #flashing
- set myendtime to the timer + 300
- set mystarttime to the timer + 20
- end
-